<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QMovie Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMovie Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QMovie class is a convenience class for playing movies with
<a href="qimagereader.html">QImageReader</a>. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qmovie.html#CacheMode-enum">CacheMode</a></b> { CacheNone, CacheAll }</li><li><div class="fn" />enum <b><a href="qmovie.html#MovieState-enum">MovieState</a></b> { NotRunning, Paused, Running }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmovie.html#QMovie">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qmovie.html#QMovie-2">__init__</a></b> (<i>self</i>, QIODevice&#160;<i>device</i>, QByteArray&#160;<i>format</i>&#160;=&#160;QByteArray(), QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qmovie.html#QMovie-3">__init__</a></b> (<i>self</i>, QString&#160;<i>fileName</i>, QByteArray&#160;<i>format</i>&#160;=&#160;QByteArray(), QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />QColor <b><a href="qmovie.html#backgroundColor">backgroundColor</a></b> (<i>self</i>)</li><li><div class="fn" />CacheMode <b><a href="qmovie.html#cacheMode">cacheMode</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a></b> (<i>self</i>)</li><li><div class="fn" />QImage <b><a href="qmovie.html#currentImage">currentImage</a></b> (<i>self</i>)</li><li><div class="fn" />QPixmap <b><a href="qmovie.html#currentPixmap">currentPixmap</a></b> (<i>self</i>)</li><li><div class="fn" />QIODevice <b><a href="qmovie.html#device">device</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmovie.html#fileName">fileName</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qmovie.html#format">format</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#frameCount">frameCount</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qmovie.html#frameRect">frameRect</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmovie.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmovie.html#jumpToFrame">jumpToFrame</a></b> (<i>self</i>, int&#160;<i>frameNumber</i>)</li><li><div class="fn" />bool <b><a href="qmovie.html#jumpToNextFrame">jumpToNextFrame</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#loopCount">loopCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#nextFrameDelay">nextFrameDelay</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qmovie.html#scaledSize">scaledSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setBackgroundColor">setBackgroundColor</a></b> (<i>self</i>, QColor&#160;<i>color</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setCacheMode">setCacheMode</a></b> (<i>self</i>, CacheMode&#160;<i>mode</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setDevice">setDevice</a></b> (<i>self</i>, QIODevice&#160;<i>device</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setFileName">setFileName</a></b> (<i>self</i>, QString&#160;<i>fileName</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setFormat">setFormat</a></b> (<i>self</i>, QByteArray&#160;<i>format</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setPaused">setPaused</a></b> (<i>self</i>, bool&#160;<i>paused</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setScaledSize">setScaledSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setSpeed">setSpeed</a></b> (<i>self</i>, int&#160;<i>percentSpeed</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#speed">speed</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmovie.html#start">start</a></b> (<i>self</i>)</li><li><div class="fn" />MovieState <b><a href="qmovie.html#state">state</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmovie.html#stop">stop</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />list-of-QByteArray <b><a href="qmovie.html#supportedFormats">supportedFormats</a></b> ()</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qmovie.html#error">error</a></b> (QImageReader::ImageReaderError)</li><li><div class="fn" />void <b><a href="qmovie.html#finished">finished</a></b> ()</li><li><div class="fn" />void <b><a href="qmovie.html#frameChanged">frameChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="qmovie.html#resized">resized</a></b> (const QSize&amp;)</li><li><div class="fn" />void <b><a href="qmovie.html#started">started</a></b> ()</li><li><div class="fn" />void <b><a href="qmovie.html#stateChanged">stateChanged</a></b> (QMovie::MovieState)</li><li><div class="fn" />void <b><a href="qmovie.html#updated">updated</a></b> (const QRect&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMovie class is a convenience class for playing movies with
<a href="qimagereader.html">QImageReader</a>.</p>
<p>This class is used to show simple animations without sound. If
you want to display video and media content, use the <a href="phonon-module.html">Phonon</a> multimedia framework instead.</p>
<p>First, create a QMovie object by passing either the name of a
file or a pointer to a <a href="qiodevice.html">QIODevice</a>
containing an animated image format to QMovie's constructor. You
can call <a href="qmovie.html#isValid">isValid</a>() to check if
the image data is valid, before starting the movie. To start the
movie, call <a href="qmovie.html#start">start</a>(). QMovie will
enter <a href="qmovie.html#MovieState-enum">Running</a> state, and
emit <a href="qmovie.html#started">started</a>() and <a href="qmovie.html#stateChanged">stateChanged</a>(). To get the current
state of the movie, call <a href="qmovie.html#state">state</a>().</p>
<p>To display the movie in your application, you can pass your
QMovie object to <a href="qlabel.html#setMovie">QLabel.setMovie</a>(). Example:</p>
<pre class="cpp">
 <span class="type"><a href="qlabel.html">QLabel</a></span> label;
 <span class="type">QMovie</span> <span class="operator">*</span>movie <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QMovie</span>(<span class="string">"animations/fire.gif"</span>);

 label<span class="operator">.</span>setMovie(movie);
 movie<span class="operator">-</span><span class="operator">&gt;</span><a href="qmovie.html#start">start</a>();
</pre>
<p>Whenever a new frame is available in the movie, QMovie will emit
<a href="qmovie.html#updated">updated</a>(). If the size of the
frame changes, <a href="qmovie.html#resized">resized</a>() is
emitted. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of
the current frame. When the movie is done, QMovie emits <a href="qmovie.html#finished">finished</a>(). If any error occurs during
playback (i.e, the image file is corrupt), QMovie will emit
<a href="qmovie.html#error">error</a>().</p>
<p>You can control the speed of the movie playback by calling
<a href="qmovie.html#speed-prop">setSpeed</a>(), which takes the
percentage of the original speed as an argument. Pause the movie by
calling setPaused(true). QMovie will then enter <a href="qmovie.html#MovieState-enum">Paused</a> state and emit <a href="qmovie.html#stateChanged">stateChanged</a>(). If you call
setPaused(false), QMovie will reenter <a href="qmovie.html#MovieState-enum">Running</a> state and start the movie
again. To stop the movie, call <a href="qmovie.html#stop">stop</a>().</p>
<p>Certain animation formats allow you to set the background color.
You can call <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>() to set
the color, or <a href="qmovie.html#backgroundColor">backgroundColor</a>() to retrieve the
current background color.</p>
<p><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a>() returns
the sequence number of the current frame. The first frame in the
animation has the sequence number 0. <a href="qmovie.html#frameCount">frameCount</a>() returns the total number
of frames in the animation, if the image format supports this. You
can call <a href="qmovie.html#loopCount">loopCount</a>() to get the
number of times the movie should loop before finishing. <a href="qmovie.html#nextFrameDelay">nextFrameDelay</a>() returns the
number of milliseconds the current frame should be displayed.</p>
<p>QMovie can be instructed to cache frames of an animation by
calling <a href="qmovie.html#cacheMode-prop">setCacheMode</a>().</p>
<p>Call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for a list of
formats that QMovie supports.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="CacheMode-enum" />QMovie.CacheMode</h3><p>This enum describes the different cache modes of <a href="qmovie.html">QMovie</a>.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.CacheNone</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">No frames are cached (the default).</td>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.CacheAll</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">All frames are cached.</td>
</tr>
</table>


<h3 class="fn"><a name="MovieState-enum" />QMovie.MovieState</h3><p>This enum describes the different states of <a href="qmovie.html">QMovie</a>.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.NotRunning</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The movie is not running. This is <a href="qmovie.html">QMovie</a>'s initial state, and the state it enters
after <a href="qmovie.html#stop">stop</a>() has been called or the
movie is finished.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.Paused</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The movie is paused, and <a href="qmovie.html">QMovie</a> stops emitting <a href="qmovie.html#updated">updated</a>() or <a href="qmovie.html#resized">resized</a>(). This state is entered after
calling <a class="compat" href="qmovie-qt3.html#pause">pause</a>()
or setPaused(true). The current frame number it kept, and the movie
will continue with the next frame when <a class="compat" href="qmovie-qt3.html#unpause">unpause</a>() or
setPaused(false) is called.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.Running</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The movie is running.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMovie" />QMovie.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qmovie.html">QMovie</a> object, passing
the <i>parent</i> object to <a href="qobject.html">QObject</a>'s
constructor.</p>
<p><b>See also</b> <a href="qmovie.html#setFileName">setFileName</a>(), <a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>


<h3 class="fn"><a name="QMovie-2" />QMovie.__init__ (<i>self</i>, <a href="qiodevice.html">QIODevice</a>&#160;<i>device</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>format</i>&#160;=&#160;QByteArray(), <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from
<i>device</i>, which it assumes is open and readable. If
<i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will
use the image format <i>format</i> for decoding the image data.
Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess
the format.</p>
<p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>


<h3 class="fn"><a name="QMovie-3" />QMovie.__init__ (<i>self</i>, QString&#160;<i>fileName</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>format</i>&#160;=&#160;QByteArray(), <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from
<i>fileName</i>. If <i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will use the image format <i>format</i>
for decoding the image data. Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess the format.</p>
<p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>


<h3 class="fn"><a name="backgroundColor" /><a href="qcolor.html">QColor</a> QMovie.backgroundColor (<i>self</i>)</h3><p>Returns the background color of the movie. If no background
color has been assigned, an invalid <a href="qcolor.html">QColor</a> is returned.</p>
<p><b>See also</b> <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>().</p>


<h3 class="fn"><a name="cacheMode" /><a href="qmovie.html#CacheMode-enum">CacheMode</a> QMovie.cacheMode (<i>self</i>)</h3><h3 class="fn"><a name="currentFrameNumber" />int QMovie.currentFrameNumber (<i>self</i>)</h3><p>Returns the sequence number of the current frame. The number of
the first frame in the movie is 0.</p>


<h3 class="fn"><a name="currentImage" /><a href="qimage.html">QImage</a> QMovie.currentImage (<i>self</i>)</h3><p>Returns the current frame as a <a href="qimage.html">QImage</a>.</p>
<p><b>See also</b> <a href="qmovie.html#currentPixmap">currentPixmap</a>() and <a href="qmovie.html#updated">updated</a>().</p>


<h3 class="fn"><a name="currentPixmap" /><a href="qpixmap.html">QPixmap</a> QMovie.currentPixmap (<i>self</i>)</h3><p>Returns the current frame as a <a href="qpixmap.html">QPixmap</a>.</p>
<p><b>See also</b> <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#updated">updated</a>().</p>


<h3 class="fn"><a name="device" /><a href="qiodevice.html">QIODevice</a> QMovie.device (<i>self</i>)</h3><p>Returns the device <a href="qmovie.html">QMovie</a> reads image
data from. If no device has currently been assigned, 0 is
returned.</p>
<p><b>See also</b> <a href="qmovie.html#setDevice">setDevice</a>()
and <a href="qmovie.html#fileName">fileName</a>().</p>


<h3 class="fn"><a name="fileName" />QString QMovie.fileName (<i>self</i>)</h3><p>Returns the name of the file that <a href="qmovie.html">QMovie</a> reads image data from. If no file name has
been assigned, or if the assigned device is not a file, an empty
<a href="qstring.html">QString</a> is returned.</p>
<p><b>See also</b> <a href="qmovie.html#setFileName">setFileName</a>() and <a href="qmovie.html#device">device</a>().</p>


<h3 class="fn"><a name="format" /><a href="qbytearray.html">QByteArray</a> QMovie.format (<i>self</i>)</h3><p>Returns the format that <a href="qmovie.html">QMovie</a> uses
when decoding image data. If no format has been assigned, an empty
QByteArray() is returned.</p>
<p><b>See also</b> <a href="qmovie.html#setFormat">setFormat</a>().</p>


<h3 class="fn"><a name="frameCount" />int QMovie.frameCount (<i>self</i>)</h3><p>Returns the number of frames in the movie.</p>
<p>Certain animation formats do not support this feature, in which
case 0 is returned.</p>


<h3 class="fn"><a name="frameRect" /><a href="qrect.html">QRect</a> QMovie.frameRect (<i>self</i>)</h3><p>Returns the rect of the last frame. If no frame has yet been
updated, an invalid <a href="qrect.html">QRect</a> is returned.</p>
<p><b>See also</b> <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#currentPixmap">currentPixmap</a>().</p>


<h3 class="fn"><a name="isValid" />bool QMovie.isValid (<i>self</i>)</h3><p>Returns true if the movie is valid (e.g., the image data is
readable and the image format is supported); otherwise returns
false.</p>


<h3 class="fn"><a name="jumpToFrame" />bool QMovie.jumpToFrame (<i>self</i>, int&#160;<i>frameNumber</i>)</h3><p>Jumps to frame number <i>frameNumber</i>. Returns true on
success; otherwise returns false.</p>


<h3 class="fn"><a name="jumpToNextFrame" />bool QMovie.jumpToNextFrame (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>bool jumpToNextFrame()</tt>.</p><p>Jumps to the next frame. Returns true on success; otherwise
returns false.</p>


<h3 class="fn"><a name="loopCount" />int QMovie.loopCount (<i>self</i>)</h3><p>Returns the number of times the movie will loop before it
finishes. If the movie will only play once (no looping), loopCount
returns 0. If the movie loops forever, loopCount returns -1.</p>
<p>Note that, if the image data comes from a sequential device
(e.g. a socket), <a href="qmovie.html">QMovie</a> can only loop the
movie if the <a href="qmovie.html#cacheMode-prop">cacheMode</a> is
set to <a href="qmovie.html#CacheMode-enum">QMovie.CacheAll</a>.</p>


<h3 class="fn"><a name="nextFrameDelay" />int QMovie.nextFrameDelay (<i>self</i>)</h3><p>Returns the number of milliseconds <a href="qmovie.html">QMovie</a> will wait before updating the next frame
in the animation.</p>


<h3 class="fn"><a name="scaledSize" /><a href="qsize.html">QSize</a> QMovie.scaledSize (<i>self</i>)</h3><p>Returns the scaled size of frames.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qmovie.html#setScaledSize">setScaledSize</a>() and <a href="qimagereader.html#scaledSize">QImageReader.scaledSize</a>().</p>


<h3 class="fn"><a name="setBackgroundColor" />QMovie.setBackgroundColor (<i>self</i>, <a href="qcolor.html">QColor</a>&#160;<i>color</i>)</h3><p>For image formats that support it, this function sets the
background color to <i>color</i>.</p>
<p><b>See also</b> <a href="qmovie.html#backgroundColor">backgroundColor</a>().</p>


<h3 class="fn"><a name="setCacheMode" />QMovie.setCacheMode (<i>self</i>, <a href="qmovie.html#CacheMode-enum">CacheMode</a>&#160;<i>mode</i>)</h3><h3 class="fn"><a name="setDevice" />QMovie.setDevice (<i>self</i>, <a href="qiodevice.html">QIODevice</a>&#160;<i>device</i>)</h3><p>Sets the current device to <i>device</i>. <a href="qmovie.html">QMovie</a> will read image data from this device when
the movie is running.</p>
<p><b>See also</b> <a href="qmovie.html#device">device</a>() and
<a href="qmovie.html#setFormat">setFormat</a>().</p>


<h3 class="fn"><a name="setFileName" />QMovie.setFileName (<i>self</i>, QString&#160;<i>fileName</i>)</h3><p>Sets the name of the file that <a href="qmovie.html">QMovie</a>
reads image data from, to <i>fileName</i>.</p>
<p><b>See also</b> <a href="qmovie.html#fileName">fileName</a>(),
<a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>


<h3 class="fn"><a name="setFormat" />QMovie.setFormat (<i>self</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>format</i>)</h3><p>Sets the format that <a href="qmovie.html">QMovie</a> will use
when decoding image data, to <i>format</i>. By default, <a href="qmovie.html">QMovie</a> will attempt to guess the format of the
image data.</p>
<p>You can call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for the full
list of formats <a href="qmovie.html">QMovie</a> supports.</p>
<p><b>See also</b> <a href="qmovie.html#format">format</a>() and
<a href="qimagereader.html#supportedImageFormats">QImageReader.supportedImageFormats</a>().</p>


<h3 class="fn"><a name="setPaused" />QMovie.setPaused (<i>self</i>, bool&#160;<i>paused</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setPaused(bool)</tt>.</p><p>If <i>paused</i> is true, <a href="qmovie.html">QMovie</a> will
enter <a href="qmovie.html#MovieState-enum">Paused</a> state and
emit stateChanged(Paused); otherwise it will enter <a href="qmovie.html#MovieState-enum">Running</a> state and emit
stateChanged(Running).</p>
<p><b>See also</b> <a class="compat" href="qmovie-qt3.html#paused">paused</a>() and <a href="qmovie.html#state">state</a>().</p>


<h3 class="fn"><a name="setScaledSize" />QMovie.setScaledSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><p>Sets the scaled frame size to <i>size</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qmovie.html#scaledSize">scaledSize</a>() and <a href="qimagereader.html#setScaledSize">QImageReader.setScaledSize</a>().</p>


<h3 class="fn"><a name="setSpeed" />QMovie.setSpeed (<i>self</i>, int&#160;<i>percentSpeed</i>)</h3><h3 class="fn"><a name="speed" />int QMovie.speed (<i>self</i>)</h3><h3 class="fn"><a name="start" />QMovie.start (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void start()</tt>.</p><p>Starts the movie. <a href="qmovie.html">QMovie</a> will enter
<a href="qmovie.html#MovieState-enum">Running</a> state, and start
emitting <a href="qmovie.html#updated">updated</a>() and <a href="qmovie.html#resized">resized</a>() as the movie progresses.</p>
<p>If <a href="qmovie.html">QMovie</a> is in the <a href="qmovie.html#MovieState-enum">Paused</a> state, this function is
equivalent to calling setPaused(false). If <a href="qmovie.html">QMovie</a> is already in the <a href="qmovie.html#MovieState-enum">Running</a> state, this function does
nothing.</p>
<p><b>See also</b> <a href="qmovie.html#stop">stop</a>() and
<a href="qmovie.html#setPaused">setPaused</a>().</p>


<h3 class="fn"><a name="state" /><a href="qmovie.html#MovieState-enum">MovieState</a> QMovie.state (<i>self</i>)</h3><p>Returns the current state of <a href="qmovie.html">QMovie</a>.</p>
<p><b>See also</b> <a href="qmovie.html#MovieState-enum">MovieState</a> and <a href="qmovie.html#stateChanged">stateChanged</a>().</p>


<h3 class="fn"><a name="stop" />QMovie.stop (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void stop()</tt>.</p><p>Stops the movie. <a href="qmovie.html">QMovie</a> enters
<a href="qmovie.html#MovieState-enum">NotRunning</a> state, and
stops emitting <a href="qmovie.html#updated">updated</a>() and
<a href="qmovie.html#resized">resized</a>(). If <a href="qmovie.html#start">start</a>() is called again, the movie will
restart from the beginning.</p>
<p>If <a href="qmovie.html">QMovie</a> is already in the <a href="qmovie.html#MovieState-enum">NotRunning</a> state, this function
does nothing.</p>
<p><b>See also</b> <a href="qmovie.html#start">start</a>() and
<a href="qmovie.html#setPaused">setPaused</a>().</p>


<h3 class="fn"><a name="supportedFormats" />list-of-QByteArray QMovie.supportedFormats ()</h3><p>Returns the list of image formats supported by <a href="qmovie.html">QMovie</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qimagereader.html#supportedImageFormats">QImageReader.supportedImageFormats</a>().</p>


<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="error" />void error (QImageReader::ImageReaderError)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted by <a href="qmovie.html">QMovie</a> when
the error <i>error</i> occurred during playback. <a href="qmovie.html">QMovie</a> will stop the movie, and enter <a href="qmovie.html#MovieState-enum">QMovie.NotRunning</a> state.</p>


<h3 class="fn"><a name="finished" />void finished ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the movie has finished.</p>
<p><b>See also</b> <a href="qmovie.html#stop">QMovie.stop</a>().</p>


<h3 class="fn"><a name="frameChanged" />void frameChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the frame number has changed to
<i>frameNumber</i>. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of
the frame.</p>
<p>This function was introduced in Qt 4.1.</p>


<h3 class="fn"><a name="resized" />void resized (const QSize&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the current frame has been resized
to <i>size</i>. This effect is sometimes used in animations as an
alternative to replacing the frame. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of
the updated frame.</p>


<h3 class="fn"><a name="started" />void started ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted after <a href="qmovie.html#start">QMovie.start</a>() has been called, and
<a href="qmovie.html">QMovie</a> has entered <a href="qmovie.html#MovieState-enum">QMovie.Running</a> state.</p>


<h3 class="fn"><a name="stateChanged" />void stateChanged (QMovie::MovieState)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted every time the state of the movie
changes. The new state is specified by <i>state</i>.</p>
<p><b>See also</b> <a href="qmovie.html#state">QMovie.state</a>().</p>


<h3 class="fn"><a name="updated" />void updated (const QRect&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the rect <i>rect</i> in the current
frame has been updated. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of
the updated frame.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>